<script setup lang="ts">
// typescript
interface IProps {
  text?: string
  image?: string
}

const props = withDefaults(defineProps<IProps>(), {
  text: "暂无数据",
  image: "../../static/images/empty/goods.png"
});
</script>

<!-- 空数据 -->
<template>
  <view class="w-components-container w-empty">
    <image :src="image" mode="widthFix"></image>
    <text>{{ text }}</text>
  </view>
</template>

<style scoped lang="scss">
// scss
.w-empty {
  width: 100%;
  min-height: 400rpx;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-flow: column;

  image {
    width: 160rpx;
  }

  text {
    color: #cccccc;
    margin-top: 30rpx;
    font-size: 28rpx;
  }
}
</style>